<template>
	<view style="height: 100vh; background-color: #FFFFFF;">
		<u-navbar title-color="#FFFFFF" height="48" back-icon-color="#FFFFFF" :border-bottom="false" :is-fixed="true" title="报警成功"
		:customBack="goHome"></u-navbar>
		<view class="view-center">
			尊敬的用户，你好！<br>
			{{content}}
			<view class="u-m-t-20">
				<u-button type="success" @click="goHome">返回上一页</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name:"",
				content:"您的通知已发送成功，已通知到该区域负责人:"
			}
		},
		onLoad(e) {
			console.log(e)
			this.content=this.content+e.name

		},
		methods: {
			goHome(){
				this.utils.request("/api/app/user/getUserInfo", {}, "get", "app", true).then(res => {
					if(res.data.roleCode == "XZ-ADMIN" || res.data.roleCode == "XZ-YH"){
						//消灾企业用户
						uni.redirectTo({
							url:"/pages/index/index_xz"
						})
					} else if(res.data.roleCode == "WB-ADMIN" || res.data.roleCode == "WB-YH"){
						//维保企业用户
						uni.redirectTo({
							url:"/pages/index/index_wb"
						})
					}else if(res.data.roleCode == "JC-ADMIN" || res.data.roleCode == "JC-YH"){
							//维保企业用户
							uni.redirectTo({
								url:"/pages/index/index_jc"
							})
					}else{
						//其他企业用户
						uni.redirectTo({
							url:"/pages/index/index_qt"
						})
					}
				}).catch(error => {
					console.log(error)
				})
			}
		}
	}
</script>

<style>

</style>

